MACH=arduino:avr:uno
PORT=/dev/ttyUSB0

HARD=/usr/share/arduino/hardware
TOOLS=/usr/share/arduino/tools

BASE=$(shell pwd)
SRC=wifilcdpix.ino
BUILDP=$(BASE)/.build
OBJ=.build/$(SRC).hex

all:
	rm -rf .build; mkdir .build 
	arduino-builder -hardware $(HARD) -tools $(TOOLS) -fqbn $(MACH) -build-path $(BUILDP) -compile $(SRC)

upload:
	avrdude -patmega328p -carduino -P$(PORT) -b115200 -D -Uflash:w:$(OBJ)
